package demo.day03
// kotlin replace操作
fun main() {
    val sourcePwd = "1234567"
    println("原来密码是：$sourcePwd")
    val result = sourcePwd.replace(Regex("[123]")){
      when(it.value){
          "1" -> "A1"
          "2" -> "B2"
          "3" -> "C3"
          else -> it.value
      }
    }
    println(result)
}